package com.karaoke.android.data.domain

import java.util.*

/**
 * Created by Administrator on 2017/4/11.
 */

open class Message<T>()
{
    constructor(cmd: Command) : this()
    {
        this.cmd = cmd
    }

    var cmd: Command = Command.RoomInit
    var value: T? = null
    var ext: HashMap<String, Any> = HashMap()
}

enum class Command
{
    RoomInit,
    SongPlayed,
    SongStartPlay,
    PublicSongs,
    ScrollTexts
}

class UdpMessage()
{
    var cmd: String = ""
    var roomNo: String = ""
    var content: String? = null
    var ext: Map<String, Any> = HashMap()

    constructor(cmd: String, roomNo: String) : this()
    {
        this.cmd = cmd
        this.roomNo = roomNo
    }
}